import { createStore, Store } from 'vuex'
import { InjectionKey } from 'vue'
import user from './modules/user'
export const key: InjectionKey<Store<state>> = Symbol('key')
export type state = {
  count: number
}
export default createStore({
  modules: {
    user,
  },
  state: {
    count: 0,
  },
  mutations: {
    add(state) {
      state.count += 1
    },
  },
})
